-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify methods and API cleanup #175
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ChangeRequestMeta and all unreleased Shape methods
dxinteractive
force-pushed
the
feature/no-batch
branch
from
January 28, 2019 12:21
097d98f
to
44a2e1d
Compare
allanhortle
approved these changes
Jan 29, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Main points:
import {Foo} from 'bar';
) to slash exports (import Foo from 'bar/Foo';
) to allow people to have smaller bundle sizes when they use less features. This convention will become more important as optional features like Add: rekey #123 and Add: utils/segment #124 are addedParcelShape
in builds by default. The usage of modifiers now promotes importingParcelShape
when it's required.ChangeRequestReducer
, many of the problems solved by these methods disappear..modifyDown()
and.modifyUp()
. If shape editing / deep editing is required, then a parcel shape updater can be imported viaimport shape from 'dataparcels/shape
and used like.modifyDown(shape(parcelShape => parcelShape))
dataparcels
BREAKING CHANGE removed all named exports in favour of slash exports, expect for type exports.
import {Action} from 'dataparcels';
becomesimport Action from 'dataparcels/Action';
BREAKING CHANGE removed
Parcel.batch()
. UseParcel.update()
with shape updaters insteadBREAKING CHANGE removed
Parcel.modifyChange()
. UseParcel.modifyUp()
with shape updaters insteadBREAKING CHANGE removed
Parcel.batchAndReturn()
.BREAKING CHANGE removed
Parcel.hasDispatched()
. Nothing should ever rely on this information, no Parcel should ever ask questions of their children.BREAKING CHANGE removed
Parcel.setChangeRequestMeta()
. Seldom used feature that doesn't fit now thatParcel.batch()
is gone.BREAKING CHANGE when a
Parcel.modifyUp()
cancels an action, a change has been made so the change request still propagates to its source. This is done so if data changes after the action is created, then that may mean that the action should no longer be cancelled, so propagating cancelled actions allows the reducer to know about the action to uncancel. Now theChangeRequestReducer
is able to bail on processing an action if anything throws aReducerCancelAction
. When an entire change request now consists of cancelled actions for its currently based data,ChangeRequest.nextData
now returnsundefined
rather than ParcelData.Removed all unreleased shape updater methods.
Parcel.updateShape(shapeUpdater)
Parcel.updateShapeIn(shapeUpdater)
Parcel.modifyShapeUp(shapeUpdater)
Parcel.modifyShapeDown(shapeUpdater)
Parcel.update(shape(shapeUpdater))
Added
ParcelShape.update()
/shape()
function, and ability forParcel.update()
,Parcel.modifyDown()
andParcel.modifyUp()
to accept these as updaters.react-dataparcels